package com.itheima.mapper;

import com.itheima.pojo.User1;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {

    @Select("select * from user1")
    List<User1> selectAll();

    @Select("select * from user1 " +
            "where uid = #{id}")
    User1 selectById(Integer id);

    @Delete("delete from user1 where uid = #{id}")
    void deleteById(Integer id);
}
